home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Prototypes.h
-
- Contains: Routine prototypes
-
- Written by: Chris White, Developer Technical Support
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- 9/28/95 CW First release
-
- */
-
-
-
- #ifndef __PROTOTYPES__
- #define __PROTOTYPES__
-
-
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
-
- #ifndef __WINDOWS__
- #include <Files.h>
- #endif
-
-
-
- #ifndef __FRAGMENTTOOL__
- #include "FragmentTool.h"
- #endif
-
- #include "FragmentStuff.h"
-
-
-
-
- #if DEBUGGING
- void DebugStrNum ( Str255 str, long num );
- #endif
-
-
-
-
- // Initialization.c
- void InitToolbox ( void );
- void InitApplication ( void );
- static Boolean CheckConfiguration ( void );
-
-
- // AppleEvents.c
- void InstallAppleEventHandlers(void);
-
-
- // Drag.c
- OSErr InstallDragHandlers ( WindowRef theWindow );
- void RemoveDragHandlers ( WindowRef theWindow );
- OSErr InitDragHandlers ( void );
-
- // DialogsStuff.h
- void DoDialogContentClick ( DialogRef theDialog, EventRecord* theEvent );
- void DoDialogItemHit ( DialogRef theDialog, int16 theItem );
- OSErr AddHFSPromise ( DragReference theDrag, ItemReference theItem );
-
-
- // Fragments.c
- OSErr ParseResource ( Handle theResource, tHeaderHan privateData );
- OSErr BuildResource ( tHeaderHan privateData, Handle theResource );
-
- OSErr CopyFragment ( tHeaderHan sourceHeader, FSSpecPtr sourceSpec, int16 sourceIndex,
- tHeaderHan targetHeader, FSSpecPtr targetSpec );
- OSErr DeleteFragment ( tHeaderHan theHeader, FSSpecPtr theSpec, int16 theIndex );
- tItemPtr GetNthItem ( tHeaderHan theHeader, int16 theIndex );
- tItemPtr GetLastItem ( tHeaderHan theHeader );
- int16 GetItemCount ( tHeaderHan theHeader );
-
- OSErr AppendFileData ( FSSpecPtr source, FSSpecPtr target, long* offset, long* length );
-
- OSErr IncrementTempUsageCount ( tItemPtr theItem );
- OSErr DecrementTempUsageCount ( tItemPtr theItem );
- int GetTempUsageCount ( tItemPtr theItem );
- FSSpecPtr GetTempSpecPtr ( tItemPtr theItem );
-
-
- // Menus.c
- void MenuDispatch ( int32 menuResult );
- void AdjustMenus ( void );
-
-
- // Windows.c
- void DoNewDocument ( void );
- void DoOpenDocument ( void );
- OSErr OpenDocument ( FSSpecPtr fileSpec, StringPtr documentName );
-
- // Did the user cancel?
- Boolean DoCloseAllDocuments ( void );
- Boolean DoCloseDocument ( WindowRef theWindow );
- Boolean DoSaveBeforeClosing ( WindowRef theWindow );
- Boolean DoSave ( WindowRef theWindow );
- Boolean DoSaveAs ( WindowRef theWindow );
-
- Boolean IsDocumentDirty ( WindowRef theWindow );
- void SetDocumentDirty ( WindowRef theWindow, Boolean bIsDirty );
-
- void AddFragToList ( ListRef theList, tItemPtr theItem );
- void UpdateFragInList ( WindowRef theWindow, int16 theIndex, StringPtr newName );
-
- OSErr CreateWindowInfo ( WindowRef windowRef, Size infoSize );
-
- OSErr CopyWindowFragment ( WindowRef source, int16 sourceIndex, WindowRef target );
- OSErr MoveWindowFragment ( WindowRef source, int16 sourceIndex, WindowRef target );
- OSErr DeleteWindowFragment ( WindowRef theWindow, int16 theIndex );
- tItemPtr GetNthWindowItem ( WindowRef theWindow, int16 theIndex );
- int16 GetIndexFromNthWindowItem ( WindowRef theWindow, int16 theIndex );
-
-
- // Lists.c
- void InitListClickLoop ( void );
- void AddToList ( ListRef theList, Str255 theString );
- void UpdateList ( ListRef theList, int16 theIndex, Str255 theString );
- void DeleteFromList ( ListRef theList, int16 theIndex );
- Boolean HandleListClick ( WindowRef theWindow, EventRecord* event );
- Boolean PtInList ( Point localPt, ListRef theList );
- void GetListRect ( Rect* theRect, ListRef theList );
- Boolean GetFirstSelection ( ListRef theList, Cell* theCell );
- Boolean GetSelection ( ListRef theList, int16* theIndex );
-
-
-
- /*
- TO DO:
- Sort this lot out
- */
-
-
- void SetWListRef ( WindowRef theWindow, ListHandle theList );
- ListHandle GetWListRef ( WindowRef theWindow );
-
-
- OSErr CreateDocumentWindow ( WindowRef* windowRef, Str255 windowTitle,
- tContentsProcPtr contentsProc, void* refCon );
- WindowRef DestroyDocumentWindow ( WindowRef windowRef );
-
- Boolean IsMovableModal ( WindowRef theWindow );
- void DrawClippedGrowIcon (WindowRef wp);
- WindowRef CreateNewDocument ( void );
- void OpenNewDocument ( void );
- void DoUpdate ( EventRecord *theEvent );
- void DoActivate (EventRecord *theEvent);
- void DoContentClick (WindowRef wp, EventRecord *theEvent);
- void DoGrowWindow(WindowRef wp, EventRecord *theEvent);
- void DoDragWindow(WindowRef wp, EventRecord *theEvent);
- void DoZoomWindow(WindowRef wp, EventRecord *theEvent, int16 WindowPart);
- void DoIdleWindow (WindowRef wp);
- void ClipToContentArea (WindowRef wp);
- void ResetClip (WindowRef wp);
- ListHandle GetWListRef ( WindowRef theWindow );
- void SetWFileRef ( WindowRef theWindow, int16 theFileRef );
- int16 GetWFileRef ( WindowRef theWindow );
- void SetWFileSpec ( WindowRef theWindow, FSSpecPtr theSpec );
- DialogRef CreateExportsDialog ( Str255 theDocTitle );
- OSErr CreateListDialog ( DialogRef* dialogRef, int16 dialogID, StringPtr dialogTitle,
- tContentsProcPtr contentsProc, void* refCon );
- OSErr CreateInfoDialog ( DialogRef* dialogRef, StringPtr dialogTitle, WindowRef theWindow, int16 theIndex );
- void SetWindowType ( WindowRef theWindow, int16 theType );
- int16 GetWindowType ( WindowRef theWindow );
- void SetWindowSubType ( WindowRef theWindow, int16 theType );
- int16 GetWindowSubType ( WindowRef theWindow );
- pascal void OutlineUserItem ( DialogRef theDialog, short theItem );
- StringPtr ConcatPStr ( Str255 ioFirstStr,Str255 inSecondStr, int16 inDestSize );
- StringPtr CopyPStr ( Str255 inSourceStr, StringPtr outDestStr, int16 inDestSize );
- StringPtr OSTypeToPStr ( OSType inOSType, StringPtr outString );
- DialogRef DestroyDialog ( DialogRef theDialog );
- OSErr AddFragments ( ListRef theList, void* refCon );
- OSErr AddFragmentExports ( ListRef theList, void* refCon );
- OSErr AddDocuments ( ListRef theList, void* refCon );
- WindowRef GetIndexedDocumentWindow ( int theIndex );
- void MoveCopySelectedFragments ( DialogRef theDialog, Boolean bMove );
-
- OSErr SetDialogValues ( DialogRef theDialog, tItemPtr theItem );
- OSErr GetDialogValues ( DialogRef theDialog, tItemPtr theItem );
-
-
- void AddFragToList ( ListRef theList, tItemPtr theItem );
- void DeleteFragFromList ( ListRef theList, int16 theIndex );
-
-
-
-
-
-
- #endif // define __PROTOTYPES__
-